@extends('admin.mainlayout')
@section('title')
    <div class="title"><span id="test">系统基本设置</span></div>
@endsection
@section('content')
<div class="setting-box">
    <div class="setting-item">
        <a href="javascript:;" class="active" idex="0">系统设置</a><a href="javascript:;" idex="1">币种比例设置</a>
    </div>
    <div class="setting" style="display: block">
        <form action="/center/setting/edit" method="post">
        <div class="setting-row">
            {{csrf_field()}}
            <input type="hidden" name="type" value="3">
            <span>ico时间</span>
            <input type="text" value="{{$rows['system']['icontime']}}" name="ico">
        </div>
        <div class="setting-row">
            <span>收款邮箱</span>
            <input type="text" value="{{$rows['system']['email']}}" name="email" style="width: 250px">
        </div>
        <div class="submit"><input type="submit" value="保存"></div>
        </form>
    </div>
    <div class="setting">
        <form action="/center/setting/edit" method="post">
            {{csrf_field()}}
        <div class="setting-row">
            <input type="hidden" name="type" value="2">
            <span>比特币兑换比例</span>
            <input type="text" name="btc" value="{{$rows['coin']['btc']}}"> （如设置兑换比例为1 100比特币可兑换100教育币）
        </div>
        <div class="setting-row">
            <span>以太币兑换比例</span>
            <input type="text" name="eth" value="{{$rows['coin']['eth']}}"> （如设置兑换比例为1 100以太币可兑换100教育币）
        </div>
        <div class="submit"><input type="submit" value="保存"></div>
        </form>
    </div>
</div>
<script>
    var message = "{{Session::get('message')}}";
    $(window).ready(function () {
        if (message) {
            layer.msg(message, {
                time: 3000 //2秒关闭（如果不配置，默认是3秒）
            });
        }
    });

    $(".setting-item a").on('click',function(){
         $(".setting-item a").removeClass('active');
         var idex = $(this).attr('idex');
         $('.setting').hide();
         $(this).addClass('active');
         $('.setting').eq(idex).show();
    })
</script>
@endsection